#ifndef Gl_TEXTURE
#define Gl_TEXTURE
#include"Interfaces/ITexture.h"

namespace gname
{
	class GLTexture:public ITexture
	{
	public:
		GLTexture( int theWidth, int theHeight, TextureInternalFormat format, int numLevels ,TexType  t = TTYPE_UNSIGNED_BYTE):ITexture( theWidth,  theHeight,  format,  numLevels ,t)
		{
			
		}
		virtual ~GLTexture()
		{ 
			RealizeTexture(); 
		    RealizeData();
		}
	protected:
		

		bool Alloc()           ;
		
		void CreateTexture ()  ;
		void RealizeTexture()  ;

		

		
	private:
		void RealizeData();   
	};
}


#endif